<?php


/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::any('/','IndexController@index');


Route::group(['namespace' => 'Api', 'middleware' => 'api'], function () {

    Route::any('/','IndexController@index');
    //token
    Route::get('imagetoken', 'ImageController@imagetoken');
    //发短信
    Route::post('sendsms', 'LoginController@sendSms');

    //注册 创建公司 同时
    Route::post('register', 'LoginController@register');
    //判断手机号是否已经注册
    Route::get('isregister', 'LoginController@isregister');

    //模糊查询公司列表
    Route::get('getcompany', 'LoginController@getcompany');

    //登陆
    Route::post('login', 'LoginController@Login');
    //

    //员工添加模版
    Route::get("personinfo",'TemplateController@personinfo');
    Route::get("entryinfo",'TemplateController@entryinfo');
    Route::post("editpersoninfo",'TemplateController@editpersoninfo');
    Route::post("editentryinfo",'TemplateController@editentryinfo');
    Route::post("updatetitle",'TemplateController@updateTitle');
    Route::get("gettitle",'TemplateController@getTitle');
    //员工模块
    Route::post('employeecreate', 'EmployeeController@create');
    Route::get('employeeshow', 'EmployeeController@show');
    Route::get('employeelist', 'EmployeeController@index');
    Route::get('employeecount', 'EmployeeController@getCount');

    //人事动态
    Route::get('personneldynamics','PersonnelDynamicsController@index');
    //组织管理
    Route::post('organizationcreate', 'OrganizationController@create');
    Route::get('organizationshow', 'OrganizationController@show');
    Route::get('organizationlist', 'OrganizationController@index');
    //岗位管理
    Route::post('postcreate', 'PostController@create');
    Route::get('postshow', 'PostController@show');
    Route::get('postlist', 'PostController@index');
    //岗位类别
    Route::post('posttypecreate', 'PostTypeController@create');
    Route::get('posttypeshow', 'PostTypeController@show');
    Route::get('posttypelist', 'PostTypeController@index');
    Route::get('posttypedelete', 'PostTypeController@delete');

    //每日考勤
    Route::post('workattendancecreate', 'WorkAttendanceController@create');
    Route::get('workattendanceshow', 'WorkAttendanceController@show');
    Route::get('workattendancelist', 'WorkAttendanceController@index');
    Route::get('workattendancedelete', 'WorkAttendanceController@delete');
    Route::get('workattendancestat', 'WorkAttendanceController@stat');
    //月度考勤汇总
    Route::post('workattendancemonthcreate', 'WorkAttendanceMonthController@create');
    Route::get('workattendancemonthshow', 'WorkAttendanceMonthController@show');
    Route::get('workattendancemonthlist', 'WorkAttendanceMonthController@index');
    Route::get('workattendancemonthdelete', 'WorkAttendanceMonthController@delete');
    Route::get('workattendancemonthstat', 'WorkAttendanceMonthController@stat');

    //月度考勤明细
    Route::get('workattendancemonthrecordlist', 'WorkAttendanceMonthRecordController@index');


    //打卡记录
    Route::post('workattendancerecordcreate', 'WorkAttendanceRecordController@create');
    Route::get('workattendancerecordshow', 'WorkAttendanceRecordController@show');
    Route::get('workattendancerecordlist', 'WorkAttendanceRecordController@index');
    Route::get('workattendancerecorddelete', 'WorkAttendanceRecordController@delete');
    //补卡记录
    Route::post('cardsupplementcreate', 'CardSupplementController@create');
    Route::get('cardsupplementshow', 'CardSupplementController@show');
    Route::get('cardsupplementlist', 'CardSupplementController@index');
    Route::get('cardsupplementdelete', 'CardSupplementController@delete');
    //排班管理-考勤组管理
    Route::post('attendancegroupcreate', 'AttendanceGroupController@create');
    Route::get('attendancegroupshow', 'AttendanceGroupController@show');
    Route::get('attendancegrouplist', 'AttendanceGroupController@index');
    Route::get('attendancegroupdelete', 'AttendanceGroupController@delete');

    //打卡方式
    Route::post('clockincreate', 'ClockInController@create');
    Route::get('clockinshow', 'ClockInController@show');
    Route::get('clockinlist', 'ClockInController@index');
    Route::get('clockindelete', 'ClockInController@delete');

    //当月工资
    Route::post('salarycreate', 'SalaryController@create');
    Route::get('salaryshow', 'SalaryController@show');
    Route::get('salarylist', 'SalaryController@index');
    Route::get('salarydelete', 'SalaryController@delete');
    Route::post('salarybase', 'SalaryController@base');
//历史工资
    Route::post('salaryhistorycreate', 'SalaryHistoryController@create');
    Route::get('salaryhistoryshow', 'SalaryHistoryController@show');
    Route::get('salaryhistorylist', 'SalaryHistoryController@index');
    Route::get('salaryhistorydelete', 'SalaryHistoryController@delete');

    //薪资设置

    //计薪规则
    Route::post('salaryrulecreate', 'SalaryRuleController@create');
    Route::get('salaryruleshow', 'SalaryRuleController@show');
    Route::get('salaryrulelist', 'SalaryRuleController@index');
    Route::get('salaryruledelete', 'SalaryRuleController@delete');

    //参保管理
    Route::post('insuredcreate', 'InsuredController@create');
    Route::get('insuredshow', 'InsuredController@show');
    Route::get('insuredlist', 'InsuredController@index');
    Route::get('insureddelete', 'InsuredController@delete');
    //参保方案
    Route::post('insuredschemecreate', 'InsuredSchemeController@create');
    Route::get('insuredschemeshow', 'InsuredSchemeController@show');
    Route::get('insuredschemelist', 'InsuredSchemeController@index');
    Route::get('insuredschemedelete', 'InsuredSchemeController@delete');
    

    //小程序接口
    //手机号登录
    Route::post('minilogin', 'MiniLoginController@Login');
    //发短信
    Route::post('minisendsms', 'MiniLoginController@sendSms');
    //微信登陆
    Route::post('wechatlogin', 'MiniLoginController@wechatLogin');
    Route::get('isbind', 'MiniLoginController@isbind');

    //首页
    Route::get('miniclockinshow', 'MiniClockInController@show');
    //打卡明细
    Route::get('minidaydetail', 'MiniClockInController@daydetail');
    //月统计
    Route::get('minimonthdetail', 'MiniClockInController@monthdetail');
    //打卡
    Route::post('miniworkattendancecreate', 'MiniClockInController@workattendancecreate');

    //更新用户信息
//    Route::post('userinfo', 'LoginController@userinfo');
//    Route::get('personal', 'LoginController@personal');


});


